package custom.pager
{
	[Bindable]
	[RemoteClass(alias="com.ltz.model.Pager")]
	public class Pager
	{
		private var _pageSize:int = 12;
		public var data:Object;
		private var _currPN:int=1;
		private var _totalPN:int=0;
		private var _totalNo:int=0;
		public function Pager()
		{
		}

		public function get totalNo():int
		{
			return _totalNo;
		}

		public function set totalNo(value:int):void
		{
			//_totalPN=-1;//在这加这句是有道理 的，只有改变一下totalPN的值，在页面上才会触发绑定，才会刷新下一页的button
			_totalNo = value;
		}

		public function get totalPN():int
		{
			if(_totalNo%_pageSize>0)
				return _totalNo/_pageSize + 1;
			return _totalNo/_pageSize;
		}

		public function set totalPN(value:int):void
		{
			_totalPN = value;
		}

		public function get currPN():int
		{
			return _currPN;
		}

		public function set currPN(value:int):void
		{
			_currPN = value;
		}

		public function get pageSize():int
		{
			return _pageSize;
		}

		public function set pageSize(value:int):void
		{
			_pageSize = value;
		}

	}
}